﻿using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IDepartment
    {
        [OperationContract]
        int Department_Using(int DepartmentID);

        [OperationContract]
        DataSet Department_GetAll();

        [OperationContract]
        DepartmentInfo Department_GetInfo(int DepartmentID);

        [OperationContract]
        DataSet Department_GetByCode(string _DepartmentCode, string _BranchCode);

        [OperationContract]
        DataSet Department_GetWithBranch(int BranchID, int _Type);

        [OperationContract]
        DataSet Department_GetAllWithBranch(int BranchID);

        [OperationContract]
        DataSet Department_GetWitchMasterID(int DepartmentID);

        [OperationContract]
        DataSet Department_GetList(out int ItemCount, int branchID, int currentPage, int pageSize);

        [OperationContract]
        int Department_Insert(DepartmentInfo eInfo);

        [OperationContract]
        bool Department_Update(DepartmentInfo eInfo);

        [OperationContract]
        bool Department_Delete(int DepartmentID);
    }
    [DataContract(Namespace = "http://HRMService")]
    public class DepartmentInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        int _BranchID;
        [DataMember]
        public int BranchID
        {
            get { return _BranchID; }
            set { _BranchID = value; }
        }
        int _MasterID;
        [DataMember]
        public int MasterID
        {
            get { return _MasterID; }
            set { _MasterID = value; }
        }
        string _Code;
        [DataMember]
        public string Code
        {
            get { return _Code; }
            set { _Code = value; }
        }
        string _Name;
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }
        string _Description;
        [DataMember]
        public string Description
        {
            get { return _Description; }
            set { _Description = value; }
        }
        bool _IsHRM;
        [DataMember]
        public bool IsHRM
        {
            get { return _IsHRM; }
            set { _IsHRM = value; }
        }
        string _Address;
        [DataMember]
        public string Address
        {
            get { return _Address; }
            set { _Address = value; }
        }
        string _LastUser;
        [DataMember]
        public string LastUser
        {
            get { return _LastUser; }
            set { _LastUser = value; }
        }
    }
   
}
